package com.ld.poetry.controller;

import com.ld.poetry.config.LoginCheck;
import com.ld.poetry.config.PoetryResult;
import com.ld.poetry.entity.ServerInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system")
public class SysInfoController {

    @LoginCheck(0)
    @GetMapping("/get-server-info")
    public PoetryResult<ServerInfo> getServerInfo(){
        ServerInfo server = new ServerInfo();
        server.collectInfo();
        return PoetryResult.success(server);
    }
}
